; ----------- Events ------------

Cls : Locate 0,0

EventEnableStack(True)
SetEventStackSize(5)

Print "stack size:"+EventStackSize%()+" Stack Enabled:"+EventStackEnabled()

For n= 1 To 10
	EmitEvent(n,400,300,"datas"+n, n*10)
Next

Print "Number of Events:"+CountEvents%()

While PollEvent()
	Select EventId()
		Case 5
			Print "This one won't print as the stack only register 5 events"
		Case 6,7,8,9,10
			Print "polled: ID="+EventId()+" X="+EventX()+" Y="+EventY()+" source="+EventSource()+" data="+EventData()
	End Select
Wend

FlushKeys():WaitKey()
End

;~IDEal Editor Parameters:
;~C#Blitz3D